#ifndef __CD_PLAYER_H__
#define __CD_PLAYER_H__

class Music {
public:
    Music(char *name);
    ~Music();

    void *getVoiceData();
    char *getName();

private:
    char name[256];
    void *music_data_;
};

class MusicPLayer {
public:
    MusicPlayer(Music *music_list);
    ~CMusiclayer();

    // Open the box for user to put in a CD
    void addMusic(Music *music);

    // Close the box 
    void removeMusic(char *name);

    // play the music on a CD
    void play(Music *music);

    // pause
    void pause();

    // resume playing
    void resume();

    // jump to the next music
    void seek();

    // jump back 
    void back();

    // display playing info, length of music, 
    // and time remaining
    void display(Music *music);

private:
    
    Music *getNextMusic();
    Music *getPrevMusic();

private:

    Music *music_list_;

    Music *current_music_;
};

class User {
public:
    User(char *name);
    ~User();

    void addUser(char *name);
    void delUser(char *name);

    char *getUserName();
    unsigned int getID();

private:
    unsigned int user_id;
    char name[256];

    static vector<User *> vec_user;
};

class JukeBox {
public:
    JukeBox();
    ~JukeBox();

    void processUser(User *user);
    User *getUser();
    Music *getMusicList();
    void playMusic();

private:
    User *user_;
    Music *music_list_;
    MusicPlayer *player_;
};

#endif

